package edu.spec.xhd.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import edu.spec.xhd.recyclerview.ActivityRecyclerView;

public class BootCompleteReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action.equals(Intent.ACTION_BOOT_COMPLETED)){
            Intent autoStartIntent = new Intent(context, ActivityRecyclerView.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(autoStartIntent);
        }
    }
}
